﻿using MLSMooc.DAO.Implement.Website;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using MLSMooc.Helper;

namespace MLSMooc.Controllers
{
    public class WebsiteController : Controller
    {
        WebsiteDAO websiteDAO = WebsiteDAO.Getinstance();

        [HttpGet]
        public async Task<string> GetByIdWebsiteInfo(string id)
        {
            var res = await websiteDAO.GetByIdWebsiteInfo(id);
            return SerializeHelper.SerializeJson(res);
        }

        [HttpGet]
        public async Task<string> GetWebsiteAllList()
        {
            var res = await websiteDAO.GetWebsiteAllList();
            return SerializeHelper.SerializeJson(res);
        }
    }
}